.class Lcom/estrongs/android/ui/dialog/m0$f;
.super Landroid/widget/BaseAdapter;
.source "PermissionDialog.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/estrongs/android/ui/dialog/m0;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "f"
.end annotation


# instance fields
.field final synthetic a:Lcom/estrongs/android/ui/dialog/m0;


# direct methods
.method constructor <init>(Lcom/estrongs/android/ui/dialog/m0;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/m0$f;->a:Lcom/estrongs/android/ui/dialog/m0;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0$f;->a:Lcom/estrongs/android/ui/dialog/m0;

    invoke-static {v0}, Lcom/estrongs/android/ui/dialog/m0;->e(Lcom/estrongs/android/ui/dialog/m0;)Lorg/json/JSONArray;

    move-result-object v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return v0

    .line 2
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0$f;->a:Lcom/estrongs/android/ui/dialog/m0;

    invoke-static {v0}, Lcom/estrongs/android/ui/dialog/m0;->e(Lcom/estrongs/android/ui/dialog/m0;)Lorg/json/JSONArray;

    move-result-object v0

    invoke-virtual {v0}, Lorg/json/JSONArray;->length()I

    move-result v0

    return v0
.end method

.method public bridge synthetic getItem(I)Ljava/lang/Object;
    .locals 0

    .line 1
    invoke-virtual {p0, p1}, Lcom/estrongs/android/ui/dialog/m0$f;->getItem(I)Lorg/json/JSONObject;

    move-result-object p1

    return-object p1
.end method

.method public getItem(I)Lorg/json/JSONObject;
    .locals 1

    .line 2
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0$f;->a:Lcom/estrongs/android/ui/dialog/m0;

    invoke-static {v0}, Lcom/estrongs/android/ui/dialog/m0;->e(Lcom/estrongs/android/ui/dialog/m0;)Lorg/json/JSONArray;

    move-result-object v0

    invoke-virtual {v0, p1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object p1
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    return-object p1

    :catch_0
    move-exception p1

    .line 3
    invoke-virtual {p1}, Lorg/json/JSONException;->printStackTrace()V

    const/4 p1, 0x0

    return-object p1
.end method

.method public getItemId(I)J
    .locals 2

    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 5

    const-string p3, "key"

    const/16 v0, 0x8

    if-nez p2, :cond_0

    .line 1
    iget-object p2, p0, Lcom/estrongs/android/ui/dialog/m0$f;->a:Lcom/estrongs/android/ui/dialog/m0;

    invoke-static {p2}, Lcom/estrongs/android/ui/dialog/m0;->f(Lcom/estrongs/android/ui/dialog/m0;)Landroid/content/Context;

    move-result-object p2

    invoke-static {p2}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object p2

    const v1, 0x7f0c01c1

    const/4 v2, 0x0

    .line 2
    invoke-virtual {p2, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    const v1, 0x7f09051a

    .line 3
    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    .line 4
    invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V

    :cond_0
    const v1, 0x7f090242

    .line 5
    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    const v2, 0x7f09023f

    .line 6
    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/CheckBox;

    .line 7
    iget-object v3, p0, Lcom/estrongs/android/ui/dialog/m0$f;->a:Lcom/estrongs/android/ui/dialog/m0;

    invoke-static {v3}, Lcom/estrongs/android/ui/dialog/m0;->d(Lcom/estrongs/android/ui/dialog/m0;)Z

    move-result v3

    const/4 v4, 0x0

    if-eqz v3, :cond_1

    .line 8
    invoke-virtual {v2, v4}, Landroid/widget/CheckBox;->setVisibility(I)V

    goto :goto_0

    .line 9
    :cond_1
    invoke-virtual {v2, v0}, Landroid/widget/CheckBox;->setVisibility(I)V

    .line 10
    :goto_0
    invoke-virtual {p0, p1}, Lcom/estrongs/android/ui/dialog/m0$f;->getItem(I)Lorg/json/JSONObject;

    move-result-object p1

    :try_start_0
    const-string v0, "name"

    .line 11
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const-string v0, "disable"

    .line 12
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getInt(Ljava/lang/String;)I

    move-result v0

    if-nez v0, :cond_2

    const/4 v0, 0x1

    goto :goto_1

    :cond_2
    const/4 v0, 0x0

    .line 13
    :goto_1
    invoke-virtual {v2, v0}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 14
    invoke-virtual {p1, p3}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0$f;->a:Lcom/estrongs/android/ui/dialog/m0;

    .line 15
    invoke-static {v0}, Lcom/estrongs/android/ui/dialog/m0;->f(Lcom/estrongs/android/ui/dialog/m0;)Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v3, 0x7f060294

    invoke-virtual {v0, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v0

    goto :goto_2

    :cond_3
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0$f;->a:Lcom/estrongs/android/ui/dialog/m0;

    .line 16
    invoke-static {v0}, Lcom/estrongs/android/ui/dialog/m0;->f(Lcom/estrongs/android/ui/dialog/m0;)Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v3, 0x7f060295

    invoke-virtual {v0, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v0

    .line 17
    :goto_2
    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 18
    invoke-virtual {p1, p3}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_4

    goto :goto_3

    :cond_4
    const/4 v4, 0x4

    :goto_3
    invoke-virtual {v2, v4}, Landroid/widget/CheckBox;->setVisibility(I)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_4

    :catch_0
    move-exception p1

    .line 19
    invoke-virtual {p1}, Lorg/json/JSONException;->printStackTrace()V

    :goto_4
    return-object p2
.end method
